serialize Config
Serializes a config class to a string.
Extension of serializeToToml that takes the additional step of encoding to string. Use to write to a file or packet.
Return
Returns a ValidationResult wrapping a String representation of the serialized config, as well as any error context
Author
fzzyhmstrs
Since
0.7.0
Parameters
Type of the config to serialize. Can be any Non-Null type.
the config instance to serialize from
the error list. error messages are appended to this for display after the serialization call
default IGNORE_NON_SYNC. With the default, elements with the NonSync annotation will be skipped. See the flag options below to serialize the entire config (ex: saving to file), fully syncing (ex: initial sync server -> client), etc.
CHECK_NON_SYNC: Byte = 0
IGNORE_NON_SYNC: Byte = 1
CHECK_RESTART: Byte = 2
IGNORE_NON_SYNC_AND_CHECK_RESTART: Byte = 3
IGNORE_VISIBILITY: Byte = 4
Serializes a config class to a string.
Extension of serializeToToml that takes the additional step of encoding to string. Use to write to a file or packet.
Return
Returns a ValidationResult wrapping a String representation of the serialized config, as well as any error context
Author
fzzyhmstrs
Since
0.7.0
Parameters
Type of the config to serialize. Can be any Non-Null type.
the config instance to serialize from
String header message that the deserializer will use when building it's ValidationResult.
default IGNORE_NON_SYNC. With the default, elements with the NonSync annotation will be skipped. See the flag options below to serialize the entire config (ex: saving to file), fully syncing (ex: initial sync server -> client), etc.
CHECK_NON_SYNC: Byte = 0
IGNORE_NON_SYNC: Byte = 1
CHECK_RESTART: Byte = 2
IGNORE_NON_SYNC_AND_CHECK_RESTART: Byte = 3
IGNORE_VISIBILITY: Byte = 4
Deprecated
Use overload that takes a ValidationResult.ErrorEntry.Mutable. Scheduled for removal 0.8.0
Serializes a config class to a string.
Extension of serializeToToml that takes the additional step of encoding to string. Use to write to a file or packet.
Return
Returns a String representation of the serialized config
Author
fzzyhmstrs
Since
0.2.0, deprecated 0.7.0 and scheduled for removal 0.8.0
Parameters
Type of the config to serialize. Can be any Non-Null type.
the config instance to serialize from
the error list. error messages are appended to this for display after the serialization call
default IGNORE_NON_SYNC. With the default, elements with the NonSync annotation will be skipped. See the flag options below to serialize the entire config (ex: saving to file), fully syncing (ex: initial sync server -> client), etc.
CHECK_NON_SYNC: Byte = 0
IGNORE_NON_SYNC: Byte = 1
CHECK_RESTART: Byte = 2
IGNORE_NON_SYNC_AND_CHECK_RESTART: Byte = 3
IGNORE_VISIBILITY: Byte = 4